package com.guang.executor.threadpoolmonitor;

import java.util.concurrent.TimeUnit;

/**
 * @author lg
 * @Description
 * @date 2022/11/1 15:37
 */
public class MyTask implements Runnable{

    /**
     * 计算任务的执行时间
     */
    private int time;

    public MyTask(int time) {
        this.time = time;
    }

    @Override
    public void run() {
        try {
            TimeUnit.SECONDS.sleep(5);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
